package cn.campus.exception.article;

import cn.campus.enums.article.ResultEnum;

/**
 * @Description: 文章操作异常类
 * @Author: linyanbin
 * @Date: 2018/9/17 0017 9:40
 */
public class ArticleException extends RuntimeException{

    private Integer code;

    public ArticleException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public ArticleException(String message, Throwable cause) {
        super(message, cause);
    }

    public ArticleException(Throwable cause) {
        super(cause);
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }
}
